From: Jim Blandy Date: Thu, 17 Jun 1993 22:03:06 +0000 (+0000) Subject: * callproc.c (Fcall_process, child_setup): If IRIX is #defined, X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~95250 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=b5aaed99d0021ea3c2943f98225239d051e60007;p=emacs.git * callproc.c (Fcall_process, child_setup): If IRIX is #defined, call setpgrp with arguments, even if USG is #defined. * process.c [IRIX] (create_process): Don't call setpgrp before opening the pty. Call it after doing the TIOCNOTTY ioctl. --- diff --git a/src/callproc.c b/src/callproc.c index 51ba9301cdc..55d97a69ac0 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -255,7 +255,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") { if (fd[0] >= 0) close (fd[0]); -#ifdef USG +#if defined (USG) && !defined (IRIX) setpgrp (); #else setpgrp (pid, pid); @@ -519,7 +519,7 @@ child_setup (in, out, err, new_argv, set_pgrp, current_dir) close (out); close (err); -#ifdef USG +#if defined (USG) && !defined (IRIX) setpgrp (); /* No arguments but equivalent in this case */ #else setpgrp (pid, pid); diff --git a/src/process.c b/src/process.c index fd15ea9bc3b..87697342b11 100644 --- a/src/process.c +++ b/src/process.c @@ -1265,7 +1265,7 @@ create_process (process, new_argv, current_dir) ioctl (xforkin, TIOCSCTTY, 0); #endif #else /* not HAVE_SETSID */ -#ifdef USG +#if defined (USG) && !defined (IRIX) /* It's very important to call setpgrp() here and no time afterwards. Otherwise, we lose our controlling tty which is set when we open the pty. */ @@ -1282,7 +1282,7 @@ create_process (process, new_argv, current_dir) int j = open ("/dev/tty", O_RDWR, 0); ioctl (j, TIOCNOTTY, 0); close (j); -#ifndef USG +#if !defined (USG) || defined (IRIX) /* In order to get a controlling terminal on some versions of BSD, it is necessary to put the process in pgrp 0 before it opens the terminal. */